ccR.Add_Rotation(
	1, -- Player Specialization
	"CC_Assassination_Solo", -- Function name
	"Developed early WoD, Not recommended.", -- Description
	"CC_Assassination_Talents", -- Talents button frame
	"CC_Assassination_Abilities", -- Abilities button frame
	"CC_Assassination_Features", -- Features button frame
	"CC_Assassination_Setup" -- Setup button frame
)
function CC_Assassination_Solo()
	if ccR.Player.Is.InCombat() then
		-- Rogue\Talents.lua
		ccR.Rogue.Talent.Combat_Readiness() -- Use Combat Readiness if your being attacked
		ccR.Rogue.Talent.Marked_for_Death(2) -- Use Marked for Death on 2 or less CP
		-- Rogue\Feature.lua
		ccR.Rogue.Feature.Kick(1) -- Interupt a spell at 1sec or less or instant channeling.
	end

	if ccR.Target.Is.Attackable() then
		if ccR.Player.Is.InStealth() then
			if ccR.Spell.CanAttack(AMBUSH) and (ccR.Player.Is.Behind("target") or ccR.Player.Has.Talent(CLOAK_AND_DAGGER)) then ccR.Cast.Attack(AMBUSH) end
		else
			ccR.Start_Attack()

			-- Free to use Dispatch, Use it ASAP
			if ccR.Spell.CanAttack(DISPATCH) and ccR.Player.Has.Buff(BLINDSIDE) then ccR.Cast.Attack(DISPATCH) end

			-- Vendetta
			if ccR.Spell.CanAttack(VENDETTA) 
			and (ccR.Player.Is.Solo() or ccR.Target.Is.Boss())
			and ccR.Target.TimeToDie() >= 20 
			and ccR.Target.TimeToDie() < 8675309
			then
				ccR.Cast.Attack(VENDETTA)
			end

			-- Marked for Death
			if ccR.Target.TimeToDie() <= 60 and ccR.Spell.Is.Ready(MARKED_FOR_DEATH) then ccR.Cast.Attack(MARKED_FOR_DEATH) end

			local vTargetCount = ccR.Target.Count(10)
			local vPlayerCount = ccR.Player.Count(10)
			-- 9+
			if vPlayerCount >= 9 then
				ccR.Rogue.Assassination.Crimson_Tempest()
				if ccR.Spell.CanAttack(ENVENOM) then ccR.Cast.Attack(ENVENOM) end
				if ccR.Spell.Is.Ready(FAN_OF_KNIVES) then ccR.Cast.Spell(FAN_OF_KNIVES) end
				return
			end
			-- 4 to 8
			if vPlayerCount >= 4 and vPlayerCount <= 8 then
				if ccR.Player.Combo_Points() <= 2 and ccR.Spell.Is.Ready(FAN_OF_KNIVES) then ccR.Cast.Spell(FAN_OF_KNIVES) end
				if ccR.Player.Combo_Points() >= 3 then
					ccR.Rogue.Assassination.Rupture(3) -- Rogue\Assassination\Functions.lua
					ccR.Rogue.Assassination.Crimson_Tempest()
					if ccR.Spell.CanAttack(ENVENOM) then ccR.Cast.Attack(ENVENOM) end
				end
				return
			end
			-- 2 to 3 enemies
			if vTargetCount >= 2 and vTargetCount <= 3 then
				ccR.Rogue.Assassination.Rupture(vTargetCount) -- Rogue\Assassination\Functions.lua
				if not ccR.Player.Has.Spell(IMPROVED_SLICE_AND_DICE) and ccR.Spell.Is.Ready(SLICE_AND_DICE) and not ccR.Player.Has.Buff(SLICE_AND_DICE) then ccR.Cast.Spell(SLICE_AND_DICE) end
				if ccR.Spell.CanAttack(ENVENOM) and (ccR.Player.Combo_Points() >= 4 or ccR.Player.Buff.Stacks(ANTICIPATION) == 5) then ccR.Cast.Attack(ENVENOM) end 
				if ccR.Target.Health() <= 35 or ccR.Player.Has.Buff(BLINDSIDE) then
					if ccR.Spell.CanAttack(DISPATCH) then ccR.Cast.Attack(DISPATCH) end 
				else
					if ccR.Spell.CanAttack(MUTILATE) then ccR.Cast.Attack(MUTILATE) end 
				end
			end
			-- Single Target Rotation
			if (vTargetCount == 1 or ccR.Target.Is.Dummy()) then
				if (ccR.Player.Combo_Points() >= 1 or ccR.Player.Buff.Stacks(ANTICIPATION) >= 1) then
					if not ccR.Player.Has.Spell(IMPROVED_SLICE_AND_DICE) and ccR.Spell.Is.Ready(SLICE_AND_DICE) and not ccR.Player.Has.Buff(SLICE_AND_DICE) then ccR.Cast.Spell(SLICE_AND_DICE) end
					if ccR.Spell.CanAttack(RUPTURE) 
					and not ccR.Target.Has.My.Debuff(RUPTURE)
					and (not ccR.Target.Is.Boss() or (ccR.Target.Is.Boss() and (ccR.Player.Combo_Points() >= 3 or ccR.Player.Buff.Stacks(ANTICIPATION) == 3)))
					then
						ccR.Cast.Attack(RUPTURE) 
					end
					if ccR.Spell.CanAttack(ENVENOM) 
					and (ccR.Player.Combo_Points() >= 4 or ccR.Player.Buff.Stacks(ANTICIPATION) == 5) 
					then
						ccR.Cast.Attack(ENVENOM) 
					end 
				end
				-- Build CP
				if ccR.Player.Combo_Points() < 5 then
					if ccR.Target.Health() <= 35 or ccR.Player.Has.Buff(BLINDSIDE) then	
						if ccR.Spell.CanAttack(DISPATCH) then ccR.CastAttack(DISPATCH) end
					else
						if ccR.Spell.CanAttack(MUTILATE) then ccR.Cast.Attack(MUTILATE) end 
					end
				end
			end
		end
	end

end